package com.xdtech.play.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.sql.Timestamp;

import com.xdtech.core.model.BaseItem;
import com.xdtech.core.orm.utils.BeanUtils;
import com.xdtech.play.model.PlayMember;

import com.xdtech.web.freemark.item.GridColumn;

/**
 * 
 * @author max.zheng
 * @create 2016-05-08 23:42:50
 * @since 1.0
 * @see
 */
public class PlayMemberItem extends BaseItem implements Serializable{
	private static final long serialVersionUID = 1L;
	private Long id;
	@GridColumn(title="玩家名称",width=100)
	private String name;
	@GridColumn(title="余额",width=100)
	private Integer money;
//	@GridColumn(title="识别ID",width=100)
	private String udid;
//	@GridColumn(title="邮箱",width=100)
	private String email;
//	@GridColumn(title="QQ",width=100)
	private String qq;
//	@GridColumn(title="微信号",width=100)
	private String wxNum;
//	@GridColumn(title="密码",width=100)
	private String password;
	@GridColumn(title="电话",width=100)
	private String telephone;
	

	public void setId(Long id) {
		this.id = id;
		addQuerys("id", id);
	}
	public Long getId() {
		return id;
	}
	
	public void setName(String name) {
		this.name = name;
		addQuerys("name", name);
	}
	public String getName() {
		return name;
	}
	
	public void setUdid(String udid) {
		this.udid = udid;
		addQuerys("udid", udid);
	}
	public String getUdid() {
		return udid;
	}
	
	public void setEmail(String email) {
		this.email = email;
		addQuerys("email", email);
	}
	public String getEmail() {
		return email;
	}
	
	public void setQq(String qq) {
		this.qq = qq;
		addQuerys("qq", qq);
	}
	public String getQq() {
		return qq;
	}
	
	public void setWxNum(String wxNum) {
		this.wxNum = wxNum;
		addQuerys("wxNum", wxNum);
	}
	public String getWxNum() {
		return wxNum;
	}
	
	public void setPassword(String password) {
		this.password = password;
		addQuerys("password", password);
	}
	public String getPassword() {
		return password;
	}
	
	public void setTelephone(String telephone) {
		this.telephone = telephone;
		addQuerys("telephone", telephone);
	}
	public String getTelephone() {
		return telephone;
	}
	
	public void setMoney(Integer money) {
		this.money = money;
		addQuerys("money", money);
	}
	public Integer getMoney() {
		return money;
	}
	
	/**
	 * 根据model构建vo
	 * 
	 * @author max
	 * @return
	 */
	public static PlayMemberItem createItem(PlayMember playMember) {
		PlayMemberItem playMemberItem = null;
		if(playMember!=null) {
			playMemberItem = new PlayMemberItem();
			BeanUtils.copyProperties(playMemberItem, playMember);
			//自定义属性设置填充
		}
		
		return playMemberItem;
	}
	/**
	 * 根据model集合创建vo集合
	 * 
	 * @author max
	 * @return
	 */
	public static List<PlayMemberItem> createItems(List<PlayMember> playMembers) {
		List<PlayMemberItem> playMemberItems = new ArrayList<PlayMemberItem>();
		for (PlayMember playMember : playMembers) {
			playMemberItems.add(createItem(playMember));
		}
		return playMemberItems;
	}
}
